﻿using UnityEngine;
using System.Collections;
    
    /* Skript by Florian Schmidt */

    /* Anzeigen eines Crosshairs an der Position des Mauszeigers. */

public class CrosshairScript : MonoBehaviour {

	private Vector3 position;
	private int textureWidth = 64;
	private int textureHeight = 64;

	// Use this for initialization
	void Start () {
		Screen.showCursor = false;
	}
	
	// Update is called once per frame
	void Update () { 


		position = Input.mousePosition;
		transform.position = Vector3.zero;
		transform.localScale = Vector3.zero;
		guiTexture.pixelInset = new Rect ( position.x - textureWidth/2, position.y - textureHeight/2, textureWidth, textureHeight );
	}
}
